<?php //strip
/**
 * Implementation of the form for a single catalog category.
 * 
 * @package odCatalogWpPlugin
 * @subpackage odCatalogWpPlugin_Forms
 * @author Ondrej Donek <ondrejd@gmail.com>
 */
class odCatalogWpPlugin_Forms_Category extends odWpPlugin_Form
{
	public function __construct()
	{
		$model = new odCatalogWpPlugin_Models_Category();
		$this->mName = 'catalog_category_form';
		$this->mDescription = '';
		$this->mFields = array(
			'ID' => array(
				'type' => self::TYPE_HIDDEN,
				'label' => null
			),
			'parent_ID' => array(
				'type' => self::TYPE_SELECT, 
				'label' => __('Nadřazená kategorie:', odCatalogWpPlugin::TEXTDOMAIN),
				'options' => $model->getAsTree(0, 'en'), 
				'default' => '0'
			),
			'locale' => array(
				'type' => self::TYPE_SELECT,
				'label' => __('Jazyková verze:', odCatalogWpPlugin::TEXTDOMAIN),
				'options' => array(
					'en' => __('Anglická', odCatalogWpPlugin::TEXTDOMAIN),
					'cs' => __('Česká', odCatalogWpPlugin::TEXTDOMAIN)
				),
				'required' => true, 
				'default' => 'en'
			),
			'urlid' => array(
				'type' => self::TYPE_TEXT, 
				'label' => __('URLID:', odCatalogWpPlugin::TEXTDOMAIN),
				'required' => true
			),
			'title' => array(
				'type' => self::TYPE_TEXT, 
				'label' => __('Název:', odCatalogWpPlugin::TEXTDOMAIN),
				'required' => true
			),
			'description' => array(
				'type' => self::TYPE_TEXTAREA,
				'label' => __('Popis:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'deleted' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Smazáno:', odCatalogWpPlugin::TEXTDOMAIN)
			)
		);
		$this->mDecorator = self::DECORATOR_TABLE;
	}
} // End of odCatalogWpPlugin_Forms_Category
